﻿<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>预订</title>
<meta name="decorator" content="default" />
<meta name="viewport"
	content="width=device-width initial-scale=1.0  maximum-scale=1.0">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta name="format-detection" content="telephone=no">
<link href="${ctxStatic}/mobile-template/sun/css/style.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">

	/**
	*提交订单
	**/
	function toBookOrder(){
		alert("HOW...");
	}
	
	
	/**
	 * 留言
	 **/
	function showGuestBook(orderId,timeId){
		
		var uid = '${uid}';
		var wid = '${wechatId}';
		
		var message = $('#message_'+timeId).val();
		alert("HOW..."+orderId+"==="+timeId+"留言内容："+message);
		var params = {'uid':uid,'wechatId':wid,'message':message,'boid':orderId,'timeId':timeId};
		$.post('${ctxFront}/wechat/book/bookOrder/dobook',params,function(data){
			alert(data);
		},'json');
		
	}
</script>

</head>
<body>
<div class="warp topic_box">
<!--头部 begin-->
<header>
<h1>预订-${bookOrder.name}</h1>
</header>
<!--头部 end-->

<!--section begin-->
<section class="sec_box_1">
 <ul class="ull_style_1">
 
 <c:forEach items="${timeList }" varStatus="s" var="time">
	  <li id="li_${time.id }"><b><span class="number">${s.index +1 }</span></b>	<a href="#">${time.name}</a>
	  	<%
	  	
	  	//<a href="javascript:showGuestBook('${bookOrder.id}','${time.id}');" class="bt_style_1"  data-toggle="modal" data-target="#myModal_${guestBook.id }">预定</a>
	  	%>
	  	<button type="button"   class="bt_style_1"  data-toggle="modal" data-target="#myModal_${time.id }">预定</button>
	  		
	  		<div id="myModal_${time.id }" class="modal hide fade" tabindex="-1" style="width:300px"
									role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
									<div class="modal-header">
										<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
										<h3 id="myModalLabel">预订-${bookOrder.name}-${time.name}</h3>
									</div>
									<div class="modal-body">
										留下您想说的话:<br>
										<textarea name="reply" id="message_${time.id }" rows="5" cols="20"></textarea>
									</div>
									<div class="modal-footer">
										<button class="bt_style_1" data-dismiss="modal" aria-hidden="true">关闭</button>
										<button class="bt_style_1"  data-dismiss="modal" aria-hidden="true" onclick="showGuestBook('${bookOrder.id}','${time.id}');">提交</button>
									</div>
			</div> <!-- 回复内容 结束-->
	  		
	  </li>
 </c:forEach>
  
 </ul>
</section>
<!--section end-->

</div>
</body>
</html>